function getPropValue<T extends object, Key extends keyof T>(
  obj: T,
  key: Key
): T[Key] {
  return obj[key];
}

type First<Tuple extends unknown[]> = Tuple extends [infer T, ...infer R]
  ? T
  : never;

type Last<Tuple extends unknown[]> = Tuple extends [...infer R, infer T]
  ? T
  : never;

type FirstRes = Last<['1', 2, 3]>;

interface User {
  name: string;
  age: number;
}

type MapType<T> = {
  [Key in keyof T]: [T[Key], T[Key], T[Key]];
};

type res = MapType<{ a: 1; b: 2 }>;
